/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import java.net.*;
import java.io.*;
/**
 *
 * @author shuhail
 */
public class URLTut {
    
    public static void main(String[] args) throws MalformedURLException, IOException {
        
        URL sampleURL = new URL("http://docs.oracle.com/javase/tutorial/networking/urls/urlInfo.html");
        System.out.println(sampleURL.getProtocol());
        System.out.println(sampleURL.getContent().toString());
        System.out.println(sampleURL.getFile());
        System.out.println(sampleURL.getRef());
        System.out.println(sampleURL.getQuery());
        System.out.println(sampleURL.getRef());
    }
    
}
